package com.itheima_04;

public class Student {
    private String name="zhangsan";
    public int age =10;
    public String sex;
    public Student() {
        System.out.println("无参构造");
    }
    public Student(String name){
        System.out.println(name+"有参构造");
    }
    private Student(int age){
        System.out.println("私有有参构造"+age);

    }
    public void show(){
        System.out.println("无参方法");

    }
    public void show1(String value){
        System.out.println("有参方法"+value);

    }
    public int show2(int number){
        System.out.println("有参有返回值方法");
        return number;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                '}';
    }
}
